package ca.etsmtl.log660.controller;

import java.util.List;

import ca.etsmtl.log660.dao.EntityFacade;
import ca.etsmtl.log660.entity.Film;

public class ControllerFacade {
	
	private EntityFacade entityFacade;
	
	public ControllerFacade() {
		this.entityFacade = new EntityFacade();
	}

	public boolean logUserIn(String email, String password) {
		return ClientManager.getInstance().logUserIn(email, password);
	}
	
	public void rentMovie(Film movieToRent) {
		LocationManager locMan = new LocationManager();
		locMan.addLocation(movieToRent);
	}
	
	public List<Film> searchMovie(
			List<String> titlesFilters,
			String startYearFilter,
			String endYearFilter,
			List<String> prodCountriesFilters,
			List<String> langagesFilters,
			List<String> genresFilters,
			List<String> realisatorsFilters,
			List<String> actorsFilters
	) {
		return this.entityFacade.searchMovie(
			titlesFilters,
			startYearFilter,
			endYearFilter,
			prodCountriesFilters,
			langagesFilters,
			genresFilters,
			realisatorsFilters,
			actorsFilters
		);
	}
}
